//
//  MTPlayGroundCell.m
//  met
//
//  Created by 李晓俊 on 2019/5/15.
//  Copyright © 2019 李晓俊. All rights reserved.
//

#import "MTPlayGroundCell.h"

@implementation MTPlayGroundCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
+(MTPlayGroundCell *)cellWithTableView:(UITableView *)tableview{
    static NSString* ID =  @"MTPlayGroundCell";
    MTPlayGroundCell* cell = [tableview dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:nil] lastObject];
    }
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    //    cell.backgroundColor = [UIColor clearColor];
    
    return cell;
}

- (void)setModel:(MTPlayGroundModel *)model {
    _model = model;
    [self.headImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.portraitMap]] placeholderImage:[UIImage imageNamed:@"椭圆 1 拷贝 7"]];
    self.name.text = [NSString stringWithFormat:@"%@",model.nickName];
    self.question.text = [NSString stringWithFormat:@"%@",model.storyName];
    self.zan.text = [NSString stringWithFormat:@"%@",model.praiseNum];
    self.time.text = [NSString compareCurrentTime2:[NSString stringWithFormat:@"%@",model.createTime]];
    self.time2.text = [NSString getTimeHHmm:[NSString stringWithFormat:@"%@",model.createTime]];
}
@end
